﻿<HTML>
<HEAD>
<TITLE>Online Ruby IDE</TITLE>

	<script src="cm/codemirror/js/codemirror.js" type="text/javascript"></script>

	<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/utilities/utilities.js"></script> 
	<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/yahoo-dom-event/yahoo-dom-event.js"></script> 
	<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/yuiloader-dom-event/yuiloader-dom-event.js"></script> 	
	<!-- Source file for TabView -->
	<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/tabview/tabview-min.js"></script>
		
	<!--aggregate file path for reset-fonts-grids.css--> 
	<!--<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css"> -->
	
	<!--aggregate file path for reset-fonts.css--> 
	<!--<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts/reset-fonts.css"> -->
	
	<!--aggregate file path for YUI Sam Skin CSS for UI controls--> 
	<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/assets/skins/sam/skin.css"> 

	<script src="rubygami/editor.js" type="text/javascript"></script>

	<link href="rubygami/editor.css" rel="stylesheet" type="text/css"></link>


</HEAD>
<BODY >
	
<div id="sampleCode" style="display:none">
require 'test/unit'
require 'test/unit/ui/console/testrunner'

class Something < Test::Unit::TestCase
	def test_truth
		assert true
	end
end    

puts Test::Unit::UI::Console::TestRunner.run(Something)
</div>

<div id="sampleCode2" style="display:none">
puts "here are some random numbers"
p (0..10).collect {(100*rand).to_i}.sort

# great free and online book on ruby
# http://poignantguide.net/ruby/
</div>


<div id="sampleCode3" style="display:none">

author = 'Michal Hantl'
email = 'michal@hantl.cz'
license = 'MIT'

"HUGE thanks to CodeMirror, JRuby and YUI team"​

</div>



<div id="ide" class="rubyIDE yui-skin-sam"></div>
<script>
YAHOO.util.Event.onDOMReady(function() {
	try {
		var ide = new RubyIDE('ide');
		window.__rubyide = ide;
		ide.view.addEditorTab('about.rb', document.getElementById('sampleCode3').innerHTML);
		ide.view.addEditorTab('unit_test.rb', document.getElementById('sampleCode').innerHTML);
		ide.view.addEditorTab('try_ruby.rb', document.getElementById('sampleCode2').innerHTML);
	} catch (e) {
		console.log(e);
	}
});
</script>


<APPLET style="visibility:hidden; height:0;" code="jrubyapplet.MyApplet" id="jrubyapplet" archive="jruby-applet/jruby-applet.jar" archive="jruby-applet/lib/jruby.jar,jruby-applet/lib/json_simple-1.1.jar" width="1" height="1">
	No Java 2 SDK, Standard Edition v 1.4.1 support for APPLET
</APPLET>

</BODY>
</HTML>